#include <iostream>
#include <vector>
#include <string>

using namespace std;

const int N = 1e6 + 10;

vector<int> add(vector<int> &A, vector<int> &B)
{
    vector<int> C;
    int t = 0;
    for (int i = 0; i < A.size() || i < B.size() || t; i++)
    {
        if (i < A.size())
            t += A.at(i);
        if (i < B.size())
            t += B.at(i);
        C.push_back(t % 10);
        t /= 10;
    }
    return C;
}

int main(void)
{
    string a, b;
    cin >> a >> b;

    vector<int> A, B;
    for (auto x = a.rbegin(); x != a.rend(); x++)
        A.push_back(*x - '0');
    for (auto x = b.rbegin(); x != b.rend(); x++)
        B.push_back(*x - '0');

    auto C = add(A, B);
    for (auto x = C.rbegin(); x != C.rend(); x++)
        cout << *x;
    cout << endl;
}

/*
#include <iostream>
#include <vector>
#include <string>

using namespace std;

const int N = 1e6 + 10;

vector<int> add(vector<int> &A, vector<int> &B)
{
    vector<int> C;
    int t = 0;
    for (int i = 0; i < A.size() || i < B.size(); i++)
    {
        if (i < A.size())
            t += A.at(i);
        if (i < B.size())
            t += B.at(i);
        C.push_back(t % 10);
        t /= 10;
    }
    if (t)
        C.push_back(1);
    return C;
}

int main(void)
{
    string a, b;
    cin >> a >> b;

    vector<int> A, B;
    for (auto x = a.rbegin(); x != a.rend(); x++)
        A.push_back(*x - '0');
    for (auto x = b.rbegin(); x != b.rend(); x++)
        B.push_back(*x - '0');

    auto C = add(A, B);
    for (auto x = C.rbegin(); x != C.rend(); x++)
        cout << *x;
    cout << endl;
}
*/